package jsyf.oa.entity.device;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by 92852 on 2018/7/11.
 */
@Entity
@Table(name = "T_DVC_TRANSPORT_CHANGE", schema = "oa", catalog = "")
public class DeviceTransportChangeEntity extends BaseEntity {
    private String changeReason = "";//变更原因
    private String newDeparture = "";//新目的地
    private String deviceId = "";//该运输信息对应的设备的ID
    private String destination = "";
    private String transportCompany = "";
    private String traComContactName = "";
    private String traComContactTel = "";
    private String modelCarLicense = "";
    private String driverName = "";
    private String driverTel = "";
    private String freight = "";
    private String deduction = "";
    private String deductionInstructions = "";
    private String cmodelCarPhotoName = "";
    private String cmodelCarPhotoUrl = "";
    private String cdriverCertificateName = "";
    private String cdriverCertificateUrl = "";
    private String cdevicePhotoName = "";
    private String cdevicePhotoUrl = "";

    public String getChangeReason() {
        return changeReason;
    }

    public void setChangeReason(String changeReason) {
        this.changeReason = changeReason;
    }

    public String getNewDeparture() {
        return newDeparture;
    }

    public void setNewDeparture(String newDeparture) {
        this.newDeparture = newDeparture;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public String getTransportCompany() {
        return transportCompany;
    }

    public void setTransportCompany(String transportCompany) {
        this.transportCompany = transportCompany;
    }

    public String getTraComContactName() {
        return traComContactName;
    }

    public void setTraComContactName(String traComContactName) {
        this.traComContactName = traComContactName;
    }

    public String getTraComContactTel() {
        return traComContactTel;
    }

    public void setTraComContactTel(String traComContactTel) {
        this.traComContactTel = traComContactTel;
    }

    public String getModelCarLicense() {
        return modelCarLicense;
    }

    public void setModelCarLicense(String modelCarLicense) {
        this.modelCarLicense = modelCarLicense;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    public String getDriverTel() {
        return driverTel;
    }

    public void setDriverTel(String driverTel) {
        this.driverTel = driverTel;
    }

    public String getFreight() {
        return freight;
    }

    public void setFreight(String freight) {
        this.freight = freight;
    }

    public String getDeduction() {
        return deduction;
    }

    public void setDeduction(String deduction) {
        this.deduction = deduction;
    }

    public String getDeductionInstructions() {
        return deductionInstructions;
    }

    public void setDeductionInstructions(String deductionInstructions) {
        this.deductionInstructions = deductionInstructions;
    }

    public String getCmodelCarPhotoName() {
        return cmodelCarPhotoName;
    }

    public void setCmodelCarPhotoName(String cmodelCarPhotoName) {
        this.cmodelCarPhotoName = cmodelCarPhotoName;
    }

    public String getCmodelCarPhotoUrl() {
        return cmodelCarPhotoUrl;
    }

    public void setCmodelCarPhotoUrl(String cmodelCarPhotoUrl) {
        this.cmodelCarPhotoUrl = cmodelCarPhotoUrl;
    }

    public String getCdriverCertificateName() {
        return cdriverCertificateName;
    }

    public void setCdriverCertificateName(String cdriverCertificateName) {
        this.cdriverCertificateName = cdriverCertificateName;
    }

    public String getCdriverCertificateUrl() {
        return cdriverCertificateUrl;
    }

    public void setCdriverCertificateUrl(String cdriverCertificateUrl) {
        this.cdriverCertificateUrl = cdriverCertificateUrl;
    }

    public String getCdevicePhotoName() {
        return cdevicePhotoName;
    }

    public void setCdevicePhotoName(String cdevicePhotoName) {
        this.cdevicePhotoName = cdevicePhotoName;
    }

    public String getCdevicePhotoUrl() {
        return cdevicePhotoUrl;
    }

    public void setCdevicePhotoUrl(String cdevicePhotoUrl) {
        this.cdevicePhotoUrl = cdevicePhotoUrl;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj=new JSONObject();
        obj.put("ID",this.getId());
        obj.put("CREATE_TIME",this.getCreateTime());
        obj.put("UPDATE_TIME",this.getUpdateTime());
        obj.put("CHANGE_REASON",this.getChangeReason());
        obj.put("DEVICE_ID",this.getDeviceId());
        obj.put("NEW_DEPARTURE",this.getNewDeparture());
        obj.put("DESTINATION",this.getDestination());
        obj.put("TRANSPORT_COMPANY",this.getTransportCompany());
        obj.put("TRA_COM_CONTACT_NAME",this.getTraComContactName());
        obj.put("TRA_COM_CONTACT_TEL",this.getTraComContactTel());
        obj.put("MODEL_CAR_LICENSE",this.getModelCarLicense());
        obj.put("DRIVER_NAME",this.getDriverName());
        obj.put("DRIVER_TEL",this.getDriverTel());
        obj.put("FREIGHT",this.getFreight());
        obj.put("DEDUCTION",this.getDeduction());
        obj.put("DEDUCTION_INSTRUCTIONS",this.getDeductionInstructions());
        obj.put("CMODEL_CAR_PHOTO_NAME",this.getCmodelCarPhotoName());
        obj.put("CMODEL_CAR_PHOTO_URL",this.getCmodelCarPhotoUrl());
        obj.put("CDRIVER_CERTIFICATE_NAME",this.getCdriverCertificateName());
        obj.put("CDRIVER_CERTIFICATE_URL",this.getCdriverCertificateUrl());
        obj.put("CDEVICE_PHOTO_NAME",this.getCdevicePhotoName());
        obj.put("CDEVICE_PHOTO_URL",this.getCdevicePhotoUrl());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_DVC_TRANSPORT_CHANGE";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("CHANGE_REASON","changeReason");
        obj.put("DEVICE_ID","deviceId");
        obj.put("NEW_DEPARTURE","newDeparture");
        obj.put("DESTINATION","destination");
        obj.put("TRANSPORT_COMPANY","transportCompany");
        obj.put("TRA_COM_CONTACT_NAME","traComContactName");
        obj.put("TRA_COM_CONTACT_TEL","traComContactTel");
        obj.put("MODEL_CAR_LICENSE","modelCarLicense");
        obj.put("DRIVER_NAME","driverName");
        obj.put("DRIVER_TEL","driverTel");
        obj.put("FREIGHT","freight");
        obj.put("DEDUCTION","deduction");
        obj.put("DEDUCTION_INSTRUCTIONS","deductionInstructions");
        obj.put("CMODEL_CAR_PHOTO_NAME","cmodelCarPhotoName");
        obj.put("CMODEL_CAR_PHOTO_URL","cmodelCarPhotoUrl");
        obj.put("CDRIVER_CERTIFICATE_NAME","cdriverCertificateName");
        obj.put("CDRIVER_CERTIFICATE_URL","cdriverCertificateUrl");
        obj.put("CDEVICE_PHOTO_NAME","cdevicePhotoName");
        obj.put("CDEVICE_PHOTO_URL","cdevicePhotoUrl");
        return obj;
    }
}
